During an audio or video call between terminals via a digital network, a large number of audio or video data packets will be produced. In order to be able to improve network bandwidth utilization and increase network call capacity, a compression process is usually performed on original audio or video data by using an encoding algorithm firstly at a transmitting terminal, and then the compressed audio or video data is transmitted to the network; and after receiving the data packets, a receiving terminal needs to perform a decompression process on the data by using a decoding algorithm corresponding to the encoding algorithm of the transmitting terminal, to restore the audio or video data.
Each terminal using this mode of communication has one codec, and which encoding type (for example, audio encoding types such as G.711, G.726, G.729 and so on, and video encoding types such as H.263, H.264, MPEG-4 and so on) to be used between terminals is primarily negotiated by means of signaling.
In a variety of encoding standard specifications, in addition to an encoding algorithm mandated to be implemented by the specifications (i.e. a baseline algorithm), there are some optional encoding algorithms (such as an unrestricted motion vector mode, a segmentation filter mode and so on described in the H.263 encoding standard specification appendix), which can enhance the encoding efficiency, enhance the fault tolerance, improve the quality of audio or video communications, but have higher requirements for capabilities of codec.
As capabilities of codec used by various terminals are different, in order to be able to ensure the compatibility of various terminals, the capabilities of the codec need to be negotiated, but in the related art, the capabilities of the codec are negotiated by means of signaling, which needs additional signaling interaction. Alternatively, the encoding algorithm mandated to be implemented by the encoding standard specifications is used in both audio and video communications; however, after using the mode, it is impossible to enhance the quality of the communication by using the optional encoding algorithm in the specifications during communication between some terminals having codecs with higher capabilities, which greatly reduces the flexibility of the encoding algorithm selection and is yet to be improved and developed.